﻿using System;
using PortalCurriculo.Util.Security;

namespace PortalCurriculo.Util.PasswordComplexity
{
   public class BasePolicy : IPolicy
   {
      protected BasePolicy()
      {
         Name = "Unnamed";
         Identifier = Guid.NewGuid();
         IsActive = true;
         Creation = DateTime.Now;
         IsBuiltInTemplate = false;
      }

      #region IPolicy Members

      /// <summary>
      /// Name of the policy.
      /// </summary>
      /// <value>The name of the policy.</value>
      public string Name
      {
         get;
         set;
      }

      /// <summary>
      /// Policy Indentifier
      /// </summary>
      /// <value>The identifier.</value>
      /// <remarks>
      /// Used to uniquely indentify the specific policy instance
      /// </remarks>
      public Guid Identifier
      {
         get;
         private set;
      }

      /// <summary>
      /// Description of the policy.
      /// </summary>
      /// <value>The description of the policy.</value>
      public string Description
      {
         get;
         set;
      }

      /// <summary>
      /// Date the policy was created
      /// </summary>
      /// <value>The creation date.</value>
      public DateTime Creation
      {
         get;
         private set;
      }

      /// <summary>
      /// Gets or sets a value indicating whether this policy instance is active.
      /// </summary>
      /// <value><c>true</c> if this instance is active; otherwise, <c>false</c>.</value>
      public bool IsActive
      {
         get;
         set;
      }

      /// <summary>
      /// True is this is an unaltered built in template policy.
      /// </summary>
      /// <value>
      /// 	<c>true</c> if this instance is built in template; otherwise, <c>false</c>.
      /// </value>
      public bool IsBuiltInTemplate
      {
         get;
         set;
      }

      #endregion

   }
}
